SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 56141: PROC EXPORT produces a comma for the first variable name on only the first row even if the first variable name is specified in the DROP= option

DetailsAboutRate It

The EXPORT procedure writes out a comma for the first variable name on the first row of the external file even though the first variable name is listed in the DROP= data set option. The erroneous comma is written out only to the first row of the external file.

The example code below replicates the problem:

proc export data=sashelp.class(drop=name)
     outfile = 'c:\class.csv' dbms=csv replace;
   putnames=yes;
run;

A snippet of the external file CLASS.CSV is shown below. This illustrates the erroneous comma at the beginning of the first row when the variable Name is listed in the DROP= data set option:

,Sex,Age,Height,Weight
M,14,69,112.5
F,13,56.5,84
F,13,65.3,98
F,14,62.8,102.5

If other variables in the SAS® data set are listed in the DROP= data set option, the variable names on the first row of the external file are correct. The problem occurs only when you drop the first variable in the SAS data set.



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemBase SASMicrosoft® Windows® for 64-Bit Itanium-based Systems9.4 TS1M0
Microsoft® Windows® for x649.4 TS1M09.4 TS1M2
Microsoft Windows 8 Enterprise x649.4 TS1M09.4 TS1M2
Microsoft Windows 8 Pro x649.4 TS1M09.4 TS1M2
Microsoft Windows 8.1 Enterprise 32-bit9.4 TS1M09.4 TS1M2
Microsoft Windows 8.1 Enterprise x649.4 TS1M09.4 TS1M2
Microsoft Windows 8.1 Pro9.4 TS1M09.4 TS1M2
Microsoft Windows 8.1 Pro 32-bit9.4 TS1M09.4 TS1M2
Microsoft Windows Server 2008 R29.4 TS1M09.4 TS1M2
Microsoft Windows Server 2008 for x649.4 TS1M09.4 TS1M2
Microsoft Windows Server 2012 Datacenter9.4 TS1M09.4 TS1M2
Microsoft Windows Server 2012 R2 Datacenter9.4 TS1M09.4 TS1M2
Microsoft Windows Server 2012 R2 Std9.4 TS1M09.4 TS1M2
Microsoft Windows Server 2012 Std9.4 TS1M09.4 TS1M2
Windows 7 Enterprise x649.4 TS1M09.4 TS1M2
Windows 7 Professional x649.4 TS1M09.4 TS1M2
64-bit Enabled AIX9.4 TS1M09.4 TS1M2
64-bit Enabled HP-UX9.4 TS1M09.4 TS1M2
64-bit Enabled Solaris9.4 TS1M09.4 TS1M2
HP-UX IPF9.4 TS1M09.4 TS1M2
Linux for x649.4 TS1M09.4 TS1M2
Solaris for x649.4 TS1M09.4 TS1M2
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.